var lk = {
    setLKButton: function () {
        function i(t, n, o) {
            if ("YDBUTTON" != o) {
                var i = Utils.copy(metaShape.metaButton);
                i.buttonType = o,
                    i.signalIndex = Model.getIDByIndex(t),
                    i.id = Utils.newId();
                var a = Model.getNodeByID(t);
                "LBUTTON" == o ? (i.inColor = Model.page.jzButtonColor, i.name = a.name + "LA") : "DBUTTON" == o ? (i.inColor = Model.page.dcButtonColor, "DIAO" == a.type.match("DIAO") ? i.name = a.name + "A" : i.name = a.name + "DA") : "DZBUTTON" == o ? (i.inColor = Model.page.dczdButtonColor, i.name = a.name + "DZA") : "TGBUTTON" == o ? (i.inColor = Model.page.tgButtonColor, i.name = a.name + "TA") : "YDBUTTON" == o ? i.inColor = Model.page.ydButtonColor : "LZBUTTON" == o ? (i.inColor = Model.page.lczdButtonColor, i.name = a.name + "LZA") : "DLBUTTON" == o && (i.inColor = Model.page.lczdButtonColor);
                var s = e[t].component.base[0].x;
                "SX" == e[t].aspect ? (i.component.point[0].x = +n * (2 * e[t].RADIUS + 2) + s + 5, i.component.point[0].y = e[t].component.base[1].y) : (i.component.point[0].x = s - 2 * e[t].RADIUS - 2 - n * (2 * e[t].RADIUS + 2), i.component.point[0].y = e[t].component.base[0].y),
                    e.push(i)
            }
        }

        var e = Model.elements;
        if (0 !== e.length) {
            for (var t = 0; t < e.length;)"BUTTON" !== e[t].category || "BGBUTTON" === e[t].buttonType || "YXBUTTON" === e[t].buttonType ? t++ : e.splice(t, 1);
            lsb.judgeAndSetSignalAspect();
            for (var n = e.length - 1,
                     t = 0; t < e.length; t++) if ("SIGNAL" == e[t].category) for ("DIAO" == e[t].type.match("DIAO"), j = 0; j < e[t].button.length; j++) i(t, j, e[t].button[j]);
            for (var o = [], t = n; t < e.length; t++) o.push(e[t]);
            submitTools.addElements(Designer.stationID, o, "all",
                function (e) {
                    e && showAlertInfo("数据提交失败，网络或服务器问题")
                })
        }
    }
};